<template>
	<view class="flex-col homepage">
		<view class="flex-col wrapper">
			<view class="flex-row wraper-row">
				<view class="u-line-1 text">姓名:</view>
				<view class="u-line-1 text-two" v-if="!!nucleic.thePatient">{{nucleic.thePatient.name}}</view>
			</view>
			<view class="flex-row wraper-row-two">
				<view class="u-line-1 text-three">身份证号:</view>
				<view class="u-line-1 text-four" v-if="!!nucleic.thePatient">{{nucleic.thePatient.number}}</view>
			</view>
<!-- 			<view class="flex-row wraper-row">
				<view class="u-line-1 text">年龄:</view>
				<view class="u-line-1 text-two">24岁</view>
			</view> -->
			<view class="flex-row wraper-row">
				<view class="u-line-1 text-three">送检查科室:</view>
				<view class="u-line-1 text-four" v-if="!!nucleic.divisionType">{{nucleic.divisionType.divisionName}}</view>
			</view>
			<view class="flex-row wraper-row-two">
				<view class="u-line-1 text-five">申请医师:</view>
				<view class="u-line-1 text-six" v-if="!!nucleic.doctor">{{nucleic.doctor.doctorName}}</view>
			</view>
			<view class="flex-row wraper-row-three">
				<view class="u-line-1 text-seven">标本种类:</view>
				<view class="u-line-1 text-eight">鼻咽拭子</view>
			</view>
<!-- 			<view class="flex-row wraper-row-four">
				<view class="u-line-1 text-nine">标本编号:</view>
				<view class="u-line-1 text-ten">1234567</view>
			</view> -->
			<view class="flex-row wraper-row-five">
				<view class="u-line-1 text-eleven">标本方法:</view>
				<view class="u-line-1 text-twelve">实时荧光定量（PCR）技术</view>
			</view>
			<view class="flex-row wraper-row-six">
				<view class="u-line-1 text-thirteen">采样日期:</view>
				<view class="u-line-1 text-fourteen">{{nucleic.visitTime}}</view>
			</view>
			<view class="u-line-1 text-fifteen"></view>
		</view>
		<view class="flex-col wrapper-two" @click="nucleicResult">
			<view class="u-line-1 text-sixteen">检测报告</view>
			<view class="flex-row wraper-row-seven">
				<view class="u-line-1 text-seventeen">项目:</view>
				<view class="u-line-1 text-eighteen">{{nucleic.entryName}}</view>
			</view>
			<view class="flex-row wraper-row-eight">
				<view class="u-line-1 text-nineteen">检测结果:</view>
				<view class="u-line-1 text-twenty">阴性</view>
			</view>
		</view>
		<view class="flex-col wrapper-three">
			<view class="flex-row wraper-row-nine">
				<view class="u-line-1 text-20">采样日期:</view>
				<view class="u-line-1 text-21">{{nucleic.visitTime}}</view>
			</view>
			<view class="u-line-1 text-22">{{nucleic.visitTime}}</view>
			<view class="u-line-1 text-23">报告日期:</view>
			<view class="flex-row wraper-row-ten">
				<view class="u-line-1 text-24">检验人员:</view>
				<view class="u-line-1 text-25" v-if="!!nucleic.doctor">{{nucleic.doctor.doctorName}}</view>
			</view>
			<view class="flex-row wraper-row-eleven">
				<view class="u-line-1 text-26">审核人员:</view>
				<view class="u-line-1 text-27" v-if="!!nucleic.doctor">{{nucleic.doctor.doctorName}}</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				URL: 'http://localhost:9000/', //主域名
				nucleic:''
			}
		},
		methods: {
			
			//核酸结果
			nucleicResult(){
				uni.navigateTo({
					url:'nucleicResult?id='+this.nucleic.thePatient.id
				})
			},
			
			//核算报告详情
			nucleicById(id){
				uni.request({
					url: this.URL + "appointment/appointment/nucleic-acid/nucleicById/" + id,
					method:"GET",
					success: (res) => {
						console.log(res)
						if (res.data.code == 20000) {
							this.nucleic = res.data.data.nucleic
						}
						console.log(this.nucleic)
					}
				})
			}
		},
		onLoad(id) {
			console.log(id.id)
			this.nucleicById(id.id)
		}
	}
</script>
<style lang="scss" scoped>
	/** 全局样式-开始,建议放在公共css样式文件中,比如common.css 或app.vue文件 */

	html,
	body {
		margin: 0;
		width: 100%;
		height: 100%;
		font-size: 16px
	}

	view,
	text,
	image {
		position: relative;
		box-sizing: border-box;
		flex-shrink: 0;
	}

	.flex-col {
		display: flex;
		align-items: flex-start;
		flex-direction: column;
	}

	.flex-row {
		display: flex;
		align-items: flex-start;
	}

	.flex-col .flex-row {
		width: 100%
	}

	/** 全局样式-结束*/

	.homepage {
		padding: 40rpx 22rpx 0rpx 22rpx;

		.wrapper {
			width: 100%;
			margin-bottom: 28rpx;
			padding: 30rpx 0rpx 40rpx 30rpx;
			border-radius: 20rpx;
			background: #f5f9ff;

			.wraper-row {
				width: 662rpx;
				justify-content: space-between;
				margin-bottom: 30rpx;

				.text {
					width: 90rpx;
					font-size: 32rpx;
				}

				.text-two {
					width: 552rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.wraper-row-two {
				width: 672rpx;
				justify-content: space-between;
				margin-bottom: 26rpx;

				.text-three {
					width: 176rpx;
					font-size: 32rpx;
				}

				.text-four {
					width: 468rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.wraper-row {
				width: 662rpx;
				justify-content: space-between;
				margin-bottom: 30rpx;

				.text-three {
					width: 176rpx;
					font-size: 32rpx;
				}

				.text-four {
					width: 468rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.wraper-row-two {
				width: 672rpx;
				justify-content: space-between;
				margin-bottom: 26rpx;

				.text-five {
					width: 152rpx;
					font-size: 32rpx;
				}

				.text-six {
					width: 500rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.wraper-row-three {
				width: 638rpx;
				justify-content: space-between;
				margin-bottom: 30rpx;

				.text-seven {
					width: 146rpx;
					font-size: 32rpx;
				}

				.text-eight {
					width: 468rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.wraper-row-four {
				width: 672rpx;
				justify-content: space-between;
				margin-bottom: 30rpx;

				.text-nine {
					width: 146rpx;
					font-size: 32rpx;
				}

				.text-ten {
					width: 500rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.wraper-row-five {
				width: 610rpx;
				justify-content: space-between;
				margin-bottom: 30rpx;

				.text-eleven {
					width: 146rpx;
					font-size: 32rpx;
				}

				.text-twelve {
					width: 444rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.wraper-row-six {
				width: 576rpx;
				justify-content: space-between;

				.text-thirteen {
					width: 146rpx;
					font-size: 32rpx;
				}

				.text-fourteen {
					width: 410rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.text-fifteen {
				top: 292rpx;
				left: -22rpx;
				position: absolute;
			}
		}

		.wrapper-two {
			width: 100%;
			margin-bottom: 32rpx;
			padding: 30rpx 0rpx 42rpx 30rpx;
			border-radius: 20rpx;
			background: #ffffff;

			.text-sixteen {
				width: 588rpx;
				margin-bottom: 30rpx;
				font-size: 32rpx;
				color: #aaaaaa;
			}

			.wraper-row-seven {
				width: 616rpx;
				justify-content: space-between;
				margin-bottom: 20rpx;

				.text-seventeen {
					width: 74rpx;
				}

				.text-eighteen {
					width: 522rpx;
				}
			}

			.wraper-row-eight {
				width: 602rpx;
				justify-content: space-between;

				.text-nineteen {
					width: 126rpx;
				}

				.text-twenty {
					width: 456rpx;
					color: #2ed477;
				}
			}
		}

		.wrapper-three {
			width: 100%;
			padding: 30rpx 0rpx 32rpx 30rpx;
			border-radius: 20rpx;
			background: #f5f9ff;

			.wraper-row-nine {
				width: 608rpx;
				justify-content: space-between;
				margin-bottom: 30rpx;

				.text-20 {
					width: 146rpx;
					font-size: 32rpx;
				}

				.text-21 {
					width: 442rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.text-22 {
				width: 422rpx;
				margin: 0rpx 0rpx -38rpx 166rpx;
				font-size: 32rpx;
				font-weight: 400nucleicReport;
			}

			.text-23 {
				width: 146rpx;
				margin-bottom: 30rpx;
				font-size: 32rpx;
			}

			.wraper-row-ten {
				width: 652rpx;
				justify-content: space-between;
				margin-bottom: 30rpx;

				.text-24 {
					width: 146rpx;
					font-size: 32rpx;
				}

				.text-25 {
					width: 486rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}

			.wraper-row-eleven {
				width: 634rpx;
				justify-content: space-between;

				.text-26 {
					width: 146rpx;
					font-size: 32rpx;
				}

				.text-27 {
					width: 468rpx;
					font-size: 32rpx;
					font-weight: 400nucleicReport;
				}
			}
		}
	}
</style>
